package com.example.demo.domain;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty; // Make sure this is imported

@JsonIgnoreProperties(ignoreUnknown = true) // This is good, it ignores any JSON fields not mapped here
public class FileUploadResponse {
    private String id;
    private String name;
    private long size;
    private String extension;

    @JsonProperty("mime_type") // Map JSON "mime_type" to Java "mimeType"
    private String mimeType;

    @JsonProperty("created_by") // Map JSON "created_by" to Java "createdBy"
    private String createdBy;

    @JsonProperty("created_at") // Map JSON "created_at" to Java "createdAt"
    private long createdAt;

    @JsonProperty("preview_url") // Map JSON "preview_url" to Java "previewUrl"
    private String previewUrl; // New field

    // --- Getters and Setters ---

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public long getSize() {
        return size;
    }

    public void setSize(long size) {
        this.size = size;
    }

    public String getExtension() {
        return extension;
    }

    public void setExtension(String extension) {
        this.extension = extension;
    }

    public String getMimeType() {
        return mimeType;
    }

    public void setMimeType(String mimeType) {
        this.mimeType = mimeType;
    }

    public String getCreatedBy() {
        return createdBy;
    }

    public void setCreatedBy(String createdBy) {
        this.createdBy = createdBy;
    }

    public long getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(long createdAt) {
        this.createdAt = createdAt;
    }

    public String getPreviewUrl() { // Getter for new field
        return previewUrl;
    }

    public void setPreviewUrl(String previewUrl) { // Setter for new field
        this.previewUrl = previewUrl;
    }
}